# encoding: utf-8



import xadmin
from django.contrib.auth.models import Group, Permission



from xadmin.models import Log

# 和X admin的view绑定
from xadmin import views

from .models import Mseeage




# 创建admin的管理类,这里不再是继承admin，而是继承object
class MessageAdmin(object):
    # 配置后台我们需要显示的列
    list_display = ['name', 'email','webadress', 'message_desc','article_type']
    # 配置搜索字段,不做时间搜索
    search_fields = ['name', 'email','webadress', 'message_desc','article_type']
    # 配置筛选字段
    list_filter = ['name', 'email','webadress', 'message_desc','article_type']


# 将model与admin管理器进行关联注册
xadmin.site.register(Mseeage, MessageAdmin)


